﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SoulDoorEngine.Components.Smart2D.Basic;
using SoulDoorEngine.Components.Smart2D.Objects;

namespace SoulDoorEngine.Components.Smart2D.Events
{
    /// <summary>
    /// 碰撞事件参数
    /// </summary>
    public class CollisionEventArgs : EventArgs
    {
        private Vector _Position;
        private GraphicObj _OtherObj;

        /// <summary>
        /// 碰撞事件另一方
        /// </summary>
        public GraphicObj OtherObj
        {
            get { return _OtherObj; }
            set { _OtherObj = value; }
        }

        /// <summary>
        /// 碰撞发生位置
        /// </summary>
        public Vector Position
        {
            get { return _Position; }
            set { _Position = value; }
        }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="position">碰撞发生位置</param>
        /// <param name="otherObj">碰撞事件另一方</param>
        public CollisionEventArgs(Vector position, GraphicObj otherObj)
        {
            this.Position = position;
            this.OtherObj = otherObj;
        }
    }
}
